USE [NANS21V]
GO
/****** オブジェクト:  DROP ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBL_WEB_USE_MSG]') AND type in (N'U'))
DROP TABLE [dbo].[TBL_WEB_USE_MSG]


/****** オブジェクト: create ******/
USE [NANS21V]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
--[TAGID],[XMLID],[XMLCODE],[TITLE],[OUTPUT](KYOGIKAI.INIの表示非表示の値)
--TAGID=3がLAP 16がKyogiokai.Iniの競技場所と仮定した場合
--[3],[Lap],[0],[ラップ],[]
--[16],[Azone],[3],[Aゾーン],[1]
--[OUTPUTDISP]は競技場所の時設定される（現在は）
CREATE TABLE [dbo].[TBL_WEB_USE_MSG](
	[TAGID] [int] NOT NULL,
	[XMLID] [varchar](64) NOT NULL,
	[XMLCODE] [int] NOT NULL,
	[TITLE] [varchar](64) COLLATE Japanese_CI_AS NULL,
	[OUTPUTDISP] [varchar](64) ,
 CONSTRAINT [PK_WEB_USE_MSG] PRIMARY KEY CLUSTERED 
(
	[TAGID]  ASC,
	[XMLCODE] ASC,
	[XMLID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] 

GO
SET ANSI_PADDING OFF
GO
--カラム作成
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'TAGID' ,
 @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',
 @level1name=N'TBL_WEB_USE_MSG', @level2type=N'COLUMN',@level2name=N'TAGID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'XMLID' ,
 @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',
 @level1name=N'TBL_WEB_USE_MSG', @level2type=N'COLUMN',@level2name=N'XMLID'
 
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'XMLCODE' ,
 @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',
 @level1name=N'TBL_WEB_USE_MSG', @level2type=N'COLUMN',@level2name=N'XMLCODE'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'タイトル' ,
 @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',
 @level1name=N'TBL_WEB_USE_MSG', @level2type=N'COLUMN',@level2name=N'TITLE'

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'表示非表示フラグ' ,
 @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',
 @level1name=N'TBL_WEB_USE_MSG', @level2type=N'COLUMN',@level2name=N'OUTPUTDISP'
GO

